<%--
  Created by IntelliJ IDEA.
  User: 陈滨进
  Date: 2021/3/19
  Time: 12:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%--<jsp:forward page="clientViedoServlet.do?action=page&pageNo=1&pageSize=4"></jsp:forward>--%>


<!DOCTYPE HTML>
<html>
<head>
    <title>Home</title>
    <%@include file="/common/utils.jsp" %>
    <%--轮播图所需的包--%>
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript">
        window.onload = function () {
            // lunboobj = document.getElementById("lunbo");
            // window.setInterval(show, 1000);

        }
    </script>

</head>
<body>
<%--只负责请求转发--%>

<%--头--%>
<%@include file="/common/head.jsp" %>


<%--左边菜单--%>
<div>
    <%@include file="/common/leftMenu.jsp" %>
</div>

<%--右边中间内容--%>


<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="main-grids">
        <%--轮播图--%>

        <div class="container theme-showcase" role="main">
            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                    <li data-target="#carousel-example-generic" data-slide-to="1" class=""></li>
                    <li data-target="#carousel-example-generic" data-slide-to="2" class=""></li>
                    <%--<li data-target="#carousel-example-generic" data-slide-to="3" class=""></li>--%>
                </ol>
                <div class="carousel-inner" role="listbox" align="center">
                    <div class="item active">
                        <%--<img data-src="holder.js/1140x500/auto/#777:#555/text:First slide" alt="First slide [1140x500]" src="" data-holder-rendered="true">--%>
                        <img src="../images/banner.jpg" width="100%" height="20px" data-holder-rendered="true">
                    </div>
                    <div class="item">
                        <%--<img data-src="holder.js/1140x500/auto/#666:#444/text:Second slide" alt="Second slide [1140x500]" src="" data-holder-rendered="true">--%>
                        <a href="ViedoServlet.do?id=${viedo.id}&action=findVideoById"><img src="../images/dev-img.jpg"
                                                                                           width="100%" height="20px"
                                                                                           data-holder-rendered="true"></a>
                    </div>
                    <div class="item">
                        <img src="../images/dev-img.jpg" width="100%" height="20px" data-holder-rendered="true">
                        <%--<img data-src="holder.js/1140x500/auto/#555:#333/text:Third slide" alt="Third slide [1140x500]" src="" data-holder-rendered="true">--%>
                    </div>

                </div>
                <%--向左--%>
                <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <%--向右--%>
                <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        </div>


        <div class="top-grids">
            <div class="recommended-info">
                <h3>最近的影片</h3>
            </div>
            <c:if test="${not empty requestScope.page.items}">
                <c:forEach items="${requestScope.page.items}" var="viedo">
                    <div class="col-md-3 resent-grid recommended-grid slider-top-grids">
                        <div>
                            <div class="resent-grid-img recommended-grid-img">
                                <a href="ViedoServlet.do?id=${viedo.id}&action=findVideoById"><img src="${viedo.pic}"
                                                                                                   alt=""/></a>
                                <div class="time">
                                    <p>3:04</p>
                                </div>
                                <div class="clck">
                                    <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
                                </div>
                            </div>
                            <div class="resent-grid-info recommended-grid-info">
                                    <%--电影名称--%>
                                <h3><a href="${viedo.path}?id=${viedo.id}&action=findVideoById" class="title title-info" onclick="recordHistory(${viedo.id})" >
                                        ${viedo.vname}
                                </a></h3>
                                <ul>
                                        <%--<li><p class="author author-info"><a href="#" class="author">John Maniya</a></p><>--%>
                                        <%--上传者--%>
                                    <li><p class="author author-info"><a href="#" class="author">${viedo.upLoader}</a>
                                    </p></li>

                                        <%--<li class="right-list"><p class="views views-info">2,114,200 views</p><>--%>
                                        <%--点赞量--%>
                                    <li class="right-list"><p class="views views-info">${viedo.number}</p>
                                </ul>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </c:if>

            <div class="clearfix"></div>
            <%--分页--%>
            <%@include file="/common/page_nav.jsp" %>

        </div>

    </div>
    <!--footer -->
    <%@include file="../common/foot.jsp" %>

    <!-- //footer -->
</div>
<div class="clearfix"></div>
<%--<div class="drop-menu">--%>
<%--<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu4">--%>
<%--<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Regular link</a></li>--%>
<%--<li role="presentation" class="disabled"><a role="menuitem" tabindex="-1" href="#">Disabled link</a></li>--%>
<%--<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another link</a></li>--%>
<%--</ul>--%>
<%--</div>--%>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/bootstrap.min.js"></script>
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
</body>
<script type="text/javascript">

</script>
</html>